export class EditorConfig {
    public width = '100%';
    public height = '400';
    public placeholder = '开始创作!';
    public path = './assets/plugin/editor.md/lib/';
    public codeFold = true;
    public searchReplace = true;
    public toolbar = true;
    public emoji = true;
    public taskList = true;
    public tex = true;
    public readOnly = false;
    public tocm = true;
    public watch = true;
    public previewCodeHighlight = true;
    public saveHTMLToTextarea = true;
    public markdown = '';
    public flowChart = true;
    public syncScrolling = true;
    public sequenceDiagram = true;
    public imageUpload = true;
    public imageFormats = ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'];
    public imageUploadURL = '';

    constructor(type) {
        switch (type) {
            case 0:
                this.width = '100%';
                this.height = '400';
                this.placeholder = '开始创作!';
                this.path = './assets/plugin/editor.md/lib/';
                this.codeFold = true;
                this.searchReplace = true;
                this.toolbar = true;
                this.emoji = true;
                this.taskList = true;
                this.tex = true;
                this.readOnly = false;
                this.tocm = true;
                this.watch = true;
                this.previewCodeHighlight = true;
                this.saveHTMLToTextarea = true;
                this.markdown = '';
                this.flowChart = true;
                this.syncScrolling = true;
                this.sequenceDiagram = true;
                this.imageUpload = true;
                this.imageFormats = ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'];
                this.imageUploadURL = '';
                break;

            case 1:
                this.width = '100%';
                this.height = '100';
                this.placeholder = '有什么新鲜事想分享给大家!';
                this.path = './assets/plugin/editor.md/lib/';
                this.codeFold = false;
                this.searchReplace = false;
                this.toolbar = false;
                this.emoji = true;
                this.taskList = false;
                this.tex = false;
                this.readOnly = false;
                this.tocm = false;
                this.watch = false;
                this.previewCodeHighlight = false;
                this.saveHTMLToTextarea = false;
                this.markdown = '';
                this.flowChart = false;
                this.syncScrolling = false;
                this.sequenceDiagram = false;
                this.imageUpload = false;
                break;

            default:
                break;
        }
    }
}
